package com.atguigu.gmall.mq.receiver;

import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

/**
 * @Author: 李旭
 * @Time: 15:48
 * @Description:
 *
 * 消息的消费者
 */
@Component
@RabbitListener(queues = "queue1")
public class ConsumerMessage {

    //接收
    @RabbitHandler
    public void message(String message){
        System.out.println("接收到的消息：" + message);
    }

}
